#include <bits/stdc++.h> 
using namespace std;
char val[1 << 11];
int n;
void dfs(int a){
	if(a >= (1 << n)){
		cout << val[a];
		return;
	}
	dfs(2 * a);
	dfs(2 * a + 1);
	if(val[2 * a] == val[2 * a + 1]){
		val[a] = val[2 * a];
	}
	else{
		val[a] = 'F';
	}
	cout << val[a];
} 
int main() {
	cin >> n;
	int num = 1;
	num = (1 << n);
	for(int i = 0 ; i < num ; i++){
		cin >> val[num + i];
		if(val[num + i] == '1'){
			val[num + i] = 'I'; 
		}
		else{
			val[num + i] = 'B';
		}
	}
	dfs(1);
}
